package com.mytest;

import com.mytest.service.ServiceA;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SptringTest {

    public static void main(String[] args) {

        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Application.class);
        ServiceA serviceA = (ServiceA) applicationContext.getBean("serviceA");
        serviceA.sayHello();
        serviceA.print();
    }
}
